AUX_SOURCE_DIRECTORY(src LIB_HISTORE_STORAGE_MANAGE_SRC)
list(SORT LIB_HISTORE_STORAGE_MANAGE_SRC)
set(SML_HISTORE sml_histore_open)
ADD_LIBRARY(${SML_HISTORE} SHARED ${LIB_HISTORE_STORAGE_MANAGE_SRC})

INCLUDE_DIRECTORIES(inc)
INCLUDE_DIRECTORIES(${GLIB_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(../smlib)
INCLUDE_DIRECTORIES(../platform)

target_link_libraries(${SML_HISTORE}
    PUBLIC ${GLIB_LIBRARIES}
    PUBLIC platform_open
    PUBLIC ${CONAN_LIBS_HUAWEI_SECURE_C}
    PUBLIC logging
    PUBLIC ${CONAN_LIBS_JSON}
)

SET_TARGET_PROPERTIES(${SML_HISTORE} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(${SML_HISTORE} PROPERTIES VERSION 0.1.0 SOVERSION 0)

INSTALL(TARGETS ${SML_HISTORE} LIBRARY DESTINATION usr/lib64)
